#pragma once
#include <nice2d/sprite.h>

class MovingSprite : public Sprite
{
public:
    MovingSprite();
    virtual ~MovingSprite();
public:
    void setAcclerate(const sf::Vector2f &accelerate);
    sf::Vector2f getAccelerate()const;

    void setVelocity(const sf::Vector2f &velocity);
    sf::Vector2f getVelocity()const;

    void setRotateVelocity(float velocity);
    float getRotateVelocity()const;
public:
    virtual PTree serialize() override;
    virtual void deserialize(const PTree &node) override;
private:
    void onUpdateEntity(float deltaTime) override;
    virtual void onUpdateMovingSprite(float deltaTime);
private:
    std::unique_ptr<class MovingSpriteData> data;
};

using MovingSpritePointer = std::shared_ptr<MovingSprite>;
using MovingSprites = std::list<MovingSpritePointer>;
